<?php
/**
 * DotHerbert
 *
 * @package    Core
 * @subpackage Stub
 * @copyright  2009 extreme-programmers
 * @license    http://dotherbert.extreme-programmers.com/license   BSD License
 * @version    $Id:$
 */

namespace dotherbert\core\stub;

/**
 * Stub for miscellaneouos functions
 *
 * @package    Core
 * @subpackage Stub
 * @author     Johannes Trink <johannes.trink@extreme-programmers.com>
 */
class MiscStub extends Stub
{
    /**
     * Instance
     *
     * @var dotherbert\core\stub\MiscStub
     */
    protected static $instance;

    /**
     * Set instance
     *
     * @param  dotherbert\core\stub\MiscStub
     * @return void
     */
    public static function setInstance(self $instance)
    {
        self::$instance = $instance;
    }

    /**
     * Get constant
     *
     * @param  string $name
     * @return mixed
     */
    public function constant($name)
    {
        return constant($name);
    }

    /**
     * Define
     *
     * @param  string $name
     * @param  mixed  $value
     * @param  bool   $caseInsensitive
     * @return bool
     */
    public function define($name, $value, $caseInsensitive = false)
    {
        return define($name, $value, $caseInsensitive);
    }

    /**
     * Defined
     *
     * @param  string $name
     * @return bool
     */
    public function defined($name)
    {
        return defined($name);
    }
}